﻿using UnityEngine;
using System.Collections;

public class GrowAndDestroy : MonoBehaviour {

	public float killScale = 10.0f;
	public float growRate = 1.0f;
	public float scale = 1.0f;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void FixedUpdate () {
		float deltaScale = growRate * Time.fixedDeltaTime;
		scale += deltaScale;

		if(GetScale() > killScale )
		{
			Destroy(this.gameObject);
		}

	}
	public float GetScale() {
		return scale;

	}
}
